/**
 * 颜色currentColor 继承父元素color
 * size 长宽一样
 */

import { LikeFilled, LikeOutlined } from "@ant-design/icons";
import { AntdIconProps } from "@ant-design/icons/lib/components/AntdIcon";

export interface IconSvg extends React.SVGProps<SVGSVGElement> {
  size?: number;
}

export const User: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      fill="currentColor"
      viewBox="0 0 24 24"
    >
      <path
        fillRule="evenodd"
        d="M8.75 6a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM12 1.25a4.75 4.75 0 100 9.5 4.75 4.75 0 000-9.5zm-3.2 12a5.55 5.55 0 00-5.55 5.55 3.95 3.95 0 003.95 3.95h9.6a3.95 3.95 0 003.95-3.95 5.55 5.55 0 00-5.55-5.55H8.8zM4.75 18.8a4.05 4.05 0 014.05-4.05h6.4a4.05 4.05 0 014.05 4.05 2.45 2.45 0 01-2.45 2.45H7.2a2.45 2.45 0 01-2.45-2.45z"
      />
    </svg>
  );
};

export const More: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
    >
      <path
        d="M3.75 6.75H20.25M3.75 12H20.25M3.75 17.25H20.25"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

export const Find: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      xmlns="http://www.w3.org/2000/svg"
      width={size}
      height={size}
      viewBox="0 0 24 24"
    >
      <path
        fill="currentColor"
        fillRule="evenodd"
        d="M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M17.9842695,7.39078625 C18.1985588,6.64477525 17.4973604,5.9435768 16.7513494,6.1578661 L16.6494246,6.19284365 L9.57835679,9.02127078 L9.47282273,9.07079854 C9.30957453,9.15937167 9.17428758,9.29167162 9.08209683,9.45256344 L9.02127078,9.57835679 L6.19284365,16.6494246 L6.1578661,16.7513494 C5.9435768,17.4973604 6.64477525,18.1985588 7.39078625,17.9842695 L7.49271102,17.949292 L14.5637788,15.1208648 L14.6693129,15.0713371 C14.8325611,14.982764 14.967848,14.850464 15.0600388,14.6895722 L15.1208648,14.5637788 L17.949292,7.49271102 L17.9842695,7.39078625 Z M12,10 C13.1045695,10 14,10.8954305 14,12 C14,13.1045695 13.1045695,14 12,14 C10.8954305,14 10,13.1045695 10,12 C10,10.8954305 10.8954305,10 12,10 Z"
      />
    </svg>
  );
};

export const Publish: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M12 10.5V16.5M15 13.5H9M13.0607 6.31066L10.9393 4.18934C10.658 3.90804 10.2765 3.75 9.87868 3.75H4.5C3.25736 3.75 2.25 4.75736 2.25 6V18C2.25 19.2426 3.25736 20.25 4.5 20.25H19.5C20.7426 20.25 21.75 19.2426 21.75 18V9C21.75 7.75736 20.7426 6.75 19.5 6.75H14.1213C13.7235 6.75 13.342 6.59197 13.0607 6.31066Z"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

export const Notice: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M14.8569 17.0817C16.7514 16.857 18.5783 16.4116 20.3111 15.7719C18.8743 14.177 17.9998 12.0656 17.9998 9.75V9.04919C17.9999 9.03281 18 9.01641 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9L5.9998 9.75C5.9998 12.0656 5.12527 14.177 3.68848 15.7719C5.4214 16.4116 7.24843 16.857 9.14314 17.0818M14.8569 17.0817C13.92 17.1928 12.9666 17.25 11.9998 17.25C11.0332 17.25 10.0799 17.1929 9.14314 17.0818M14.8569 17.0817C14.9498 17.3711 15 17.6797 15 18C15 19.6569 13.6569 21 12 21C10.3431 21 9 19.6569 9 18C9 17.6797 9.05019 17.3712 9.14314 17.0818"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

export const Logo: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      height={size}
      viewBox="0 0 63 25"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M0 2C0 0.895432 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V21.5105C24 22.615 23.1046 23.5105 22 23.5105H17.4001C17.4591 23.4794 17.518 23.4473 17.5767 23.4141C18.4763 22.9051 19.2576 22.1327 19.9205 21.0969C20.5833 20.0612 21.045 18.7562 21.3054 17.1818C21.5777 15.5365 21.5421 14.1989 21.1989 13.169C20.8615 12.1392 20.3259 11.3846 19.592 10.9052C18.864 10.4258 18.0502 10.1861 17.1506 10.1861C16.4759 10.1861 15.8633 10.3045 15.3129 10.5412C14.7624 10.772 14.283 11.0827 13.8746 11.4734C13.4663 11.8581 13.1378 12.2812 12.8892 12.7429H12.8182L13.9545 5.81818H9.05398L6.11678 23.5105H2C0.89543 23.5105 0 22.615 0 21.5105V2ZM11.9837 23.0057C12.135 23.1941 12.3097 23.3623 12.5078 23.5105H10.9783L11.2557 21.7628H11.3977C11.5043 22.2244 11.6996 22.6387 11.9837 23.0057ZM11.9659 17.1818C11.8594 17.8447 11.8535 18.4188 11.9482 18.9041C12.0429 19.3835 12.2293 19.7564 12.5075 20.0227C12.7856 20.2831 13.1496 20.4134 13.5994 20.4134C14.0492 20.4134 14.4547 20.2861 14.8157 20.0316C15.1767 19.7712 15.4815 19.4013 15.7301 18.9219C15.9787 18.4366 16.1562 17.8565 16.2628 17.1818C16.3693 16.5071 16.3782 15.93 16.2894 15.4506C16.2006 14.9653 16.0201 14.5954 15.7479 14.3409C15.4756 14.0805 15.1146 13.9503 14.6648 13.9503C14.215 13.9503 13.8066 14.0805 13.4396 14.3409C13.0727 14.5954 12.762 14.9653 12.5075 15.4506C12.253 15.93 12.0724 16.5071 11.9659 17.1818ZM26.983 23.4141C27.9418 23.9704 29.1491 24.2486 30.6051 24.2486C31.8717 24.2486 33.0051 24.0592 34.0053 23.6804C35.0115 23.2957 35.8578 22.7571 36.5444 22.0646C37.2369 21.3662 37.7429 20.5436 38.0625 19.5966H33.5881C33.446 19.857 33.2566 20.079 33.0199 20.2624C32.7891 20.44 32.5227 20.5761 32.2209 20.6708C31.925 20.7596 31.6113 20.804 31.2798 20.804C30.7945 20.804 30.398 20.7063 30.0902 20.511C29.7824 20.3157 29.5664 20.0464 29.4421 19.7031C29.3178 19.3598 29.2912 18.9692 29.3622 18.5312L29.4022 18.3182H38.2756L38.4531 17.1818C38.6307 16.0987 38.6307 15.1281 38.4531 14.2699C38.2815 13.4058 37.95 12.6689 37.4588 12.0593C36.9676 11.4497 36.3313 10.9851 35.5501 10.6655C34.7747 10.3459 33.8722 10.1861 32.8423 10.1861C31.4337 10.1861 30.1612 10.479 29.0249 11.065C27.8944 11.6509 26.9563 12.4706 26.2106 13.5241C25.4708 14.5777 24.9825 15.8087 24.7457 17.2173C24.4972 18.6851 24.5682 19.9458 24.9588 20.9993C25.3494 22.0469 26.0241 22.8518 26.983 23.4141ZM29.91 15.6193H34.1918C34.2509 15.2287 34.2125 14.8854 34.0764 14.5895C33.9461 14.2876 33.736 14.0539 33.446 13.8881C33.1619 13.7165 32.8187 13.6307 32.4162 13.6307C32.0137 13.6307 31.6349 13.7165 31.2798 13.8881C30.9306 14.0598 30.6317 14.2995 30.3832 14.6072C30.1545 14.8973 29.9968 15.2346 29.91 15.6193ZM46.4898 10.3636H41.5892L39.3165 24H44.2171L46.4898 10.3636ZM42.6457 8.28622C43.0541 8.72419 43.5897 8.94318 44.2526 8.94318C44.9214 8.94318 45.5251 8.72419 46.0637 8.28622C46.6082 7.84233 46.9278 7.31558 47.0225 6.70597C47.1231 6.08452 46.9751 5.55776 46.5786 5.12571C46.182 4.68774 45.6494 4.46875 44.9806 4.46875C44.3177 4.46875 43.714 4.68774 43.1695 5.12571C42.625 5.55776 42.2994 6.08452 42.1929 6.70597C42.0864 7.31558 42.2373 7.84233 42.6457 8.28622ZM51.65 24L52.9284 16.3295C52.9995 15.8797 53.1415 15.495 53.3546 15.1754C53.5736 14.8499 53.8458 14.6013 54.1713 14.4297C54.5028 14.2521 54.8697 14.1634 55.2722 14.1634C55.8936 14.1634 56.3405 14.3557 56.6128 14.7404C56.8909 15.1251 56.9767 15.6548 56.8702 16.3295L55.5918 24H60.4924L61.9483 15.2997C62.1141 14.3054 62.0637 13.4235 61.7974 12.6541C61.5311 11.8847 61.0783 11.281 60.4391 10.843C59.7999 10.4051 59.0009 10.1861 58.0421 10.1861C57.03 10.1861 56.1245 10.4317 55.3255 10.9229C54.5265 11.4083 53.905 12.0859 53.4611 12.956H53.3191L54.4909 5.81818H49.7679L46.7495 24H51.65Z"
        fill="#FF1B1B"
      />
    </svg>
  );
};

export const Play: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        fillRule="evenodd"
        clipRule="evenodd"
        d="M4.5 5.65306C4.5 4.22693 6.029 3.32288 7.2786 4.01016L18.8192 10.3575C20.1144 11.0698 20.1144 12.9309 18.8192 13.6433L7.2786 19.9906C6.029 20.6779 4.5 19.7738 4.5 18.3477V5.65306Z"
        fill="currentColor"
      />
    </svg>
  );
};

//点赞
export const Like: React.FC<
  AntdIconProps & {
    liked?: boolean;
  }
> = (props) => {
  const { size = 24, liked, ...nest } = props;
  return (
    <>
      {liked ? (
        <LikeFilled
          {...(nest as any)}
          style={{ fontSize: size, color: "#F44336" }}
        />
      ) : (
        <LikeOutlined {...(nest as any)} style={{ fontSize: size }} />
      )}
    </>
  );
};

export const Lock: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M16.5 10.5V6.75C16.5 4.26472 14.4853 2.25 12 2.25C9.51472 2.25 7.5 4.26472 7.5 6.75V10.5M6.75 21.75H17.25C18.4926 21.75 19.5 20.7426 19.5 19.5V12.75C19.5 11.5074 18.4926 10.5 17.25 10.5H6.75C5.50736 10.5 4.5 11.5074 4.5 12.75V19.5C4.5 20.7426 5.50736 21.75 6.75 21.75Z"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

//聊天
export const Chat: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M12 20.25C16.9706 20.25 21 16.5563 21 12C21 7.44365 16.9706 3.75 12 3.75C7.02944 3.75 3 7.44365 3 12C3 14.1036 3.85891 16.0234 5.2728 17.4806C5.70538 17.9265 6.01357 18.5192 5.85933 19.121C5.68829 19.7883 5.368 20.3959 4.93579 20.906C5.0918 20.9339 5.25 20.9558 5.40967 20.9713C5.60376 20.9903 5.80078 21 6 21C7.28201 21 8.47016 20.5979 9.44517 19.9129C10.2551 20.1323 11.1125 20.25 12 20.25Z"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

//❌
export const XCicle: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M9.75 9.75L14.25 14.25M14.25 9.75L9.75 14.25M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

//收藏
export const Collect: React.FC<
  IconSvg & {
    collected?: boolean;
  }
> = (props) => {
  const { size = 24, collected, ...nest } = props;
  return (
    <svg
      {...nest}
      width={size}
      height={size}
      viewBox="0 0 32 32"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M18.6992 4.62713L20.9469 8.93616C21.288 9.57602 21.9102 10.0259 22.6326 10.1259L27.3788 10.7758C29.9175 11.1257 30.9008 14.255 29.0244 15.9946L25.7733 18.9939C25.2114 19.5138 24.9505 20.2836 25.091 21.0334L25.8837 25.4324C26.3252 27.8819 23.7765 29.7915 21.5389 28.6717L17.0034 26.4222C16.3713 26.1123 15.6287 26.1123 14.9966 26.4222L10.4611 28.6717C8.22347 29.7815 5.67477 27.8819 6.11628 25.4324L6.90898 21.0334C7.04946 20.2836 6.78857 19.5138 6.22665 18.9939L2.97556 15.9946C1.09916 14.265 2.08251 11.1257 4.62118 10.7758L9.36737 10.1259C10.0898 10.0259 10.722 9.58601 11.0531 8.93616L13.3008 4.62713C14.4447 2.45762 17.5653 2.45762 18.6992 4.62713Z"
        fill={collected ? "#FCD53F" : undefined}
        stroke={collected ? undefined : "currentColor"}
        strokeWidth="2"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};

//结算
export const Dollar: React.FC<IconSvg> = (props) => {
  const { size = 24, ...nest } = props;
  return (
    <svg
      {...nest}
      width={24}
      height={24}
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <path
        d="M12 6V18M9 15.1818L9.87887 15.841C11.0504 16.7197 12.9498 16.7197 14.1214 15.841C15.2929 14.9623 15.2929 13.5377 14.1214 12.659C13.5355 12.2196 12.7677 12 11.9999 12C11.275 12 10.5502 11.7804 9.99709 11.341C8.891 10.4623 8.891 9.03772 9.9971 8.15904C11.1032 7.28036 12.8965 7.28036 14.0026 8.15904L14.4175 8.48863M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
};
